#include"windowgui.h"
void windows(HWND hwnd,int x,int y,int xa,int ya,int high,int stat,int colorR,int colorG,int colorB)
{
    int cR,cG,cB;
    HDC hdc = GetDC(hwnd);
    if(stat)
    {
        colorR /= 2;
        colorG /= 2;
        colorB /= 2;
    }
    HPEN hpen = CreatePen(PS_SOLID, 1 ,RGB(colorR,colorG,colorB));
    HBRUSH hbru = CreateSolidBrush(RGB(colorR,colorG,colorB));
    SelectObject(hdc, hpen);
    SelectObject(hdc, hbru);
    Rectangle(hdc,x,y,xa,ya);
    if(stat)
    {
        cR=255;
        cG=255;
        cB=255;
    }
    else
    {
        cR=0;
        cG=0;
        cB=0;
    }
    hpen = CreatePen(PS_SOLID, 1 ,RGB(cR,cG,cB));
    hbru = CreateSolidBrush(RGB(cR,cG,cB));
    SelectObject(hdc, hpen);
    SelectObject(hdc, hbru);
    Rectangle(hdc,x-high,y-high,xa+high,y);
    Rectangle(hdc,x-high,ya,xa+high,ya+high);
    Rectangle(hdc,x-high,y,x,ya);
    Rectangle(hdc,xa,y,xa+high,ya);

    ReleaseDC(hwnd,hdc);
    DeleteObject(hpen);
    DeleteObject(hbru);
}
